Fix theano compilation mode