Safely import theano in test_theanocode