__DIR__ was never defined

The JS files would not lode, when in dev mode because __DIR__ was not
defined
Merge pull request #800 from Ha99y/20131004_retro-compat.js.php

__DIR__ is available since PHP 5.3