Fix module loading in PURE_STATIC builds