enhanced module loader to not rely on PATH_MAX