Added partial compability to bookshelf.js