Added compatibility with Rails4

This commit adds ability to use CFoundry gem with Rails4 applications.

Tests passed.