Allow Rails backwards compatibility

Add some tweaks to make it possible to run the specs and the gem itself
on both Rails 4 and 3 versions

Users should be able to bundle using a specific Rails version by
specifying the RAILS env var