Allow bower to be run as root
Made code compatible to PHP 5.3