Only include railties if Rails is loaded

This means we can extend non-rails projects with piratey goodness.