Modified camelize(str) function to allow compatibility with old browser that do not support ES5