Only define BOOST_COMPILER if not already done

 (as it is already the case for g++ and ms).

Usefull when called through cuda's nvcc.
fixes #10420