Allow passing of kwargs to theano.function.

@mrocklin What do you think of this change?