Solving Hybrid Boolean Constraints by Fourier Expansions and Continuous Optimization