Update for changed interface in Theano.

See: https://github.com/Theano/Theano/commit/b5af34062e5226492e4a9f7ae05c3ebea46c3f84
Corrections from lamblin.
complete the fix to local_optimizer
Merge pull request #499 from nouiz/theano-interface-change

Theano interface change