Fix compilation crash on windows.

Follow up from: [pylearn-dev] Problems of compile theano function while using GpuImgActs from Pylearn2

The problem was reported by Hailin SHI
I amended the commit to fix this.