Updated Object.create to a more compatibile version

Old Object.create code might cause problems with some libraries e.g. browserify