Do not attempt compilation without a compiler

This fixes a crash on "import theano" when g++ is not available.
Merge pull request #1342 from delallea/minor

Do not attempt compilation without a compiler