Modified camelize(str) function to allow compatibility with ie versions < ie8 that does not support ECMAScript versions < ES5