Adapting code for working with GAE 1.7.3 and later

In Google App Engine 1.7.3 some method names changed and the old ones went deprecated. Those old ones got removed in 1.7.5 version. This patch fixes it.