Updated camelcase function to work in PHP 5.5