Add fallback for ORMs which do not support transactions

Refer to comments on https://github.com/thoughtbot/paperclip/commit/a01677f58762394c2915eb512fe2f69aec6fbcf5