SplClassLoader implementation based on https://gist.github.com/jwage/221634