REST API: __DIR__ isn't supported on PHP < 5.3

http://php.net/manual/en/language.constants.predefined.php