Do not attempt compilation without a compiler

This fixes a crash on "import theano" when g++ is not available.