Support 1.8.7 outside of Rails context