Native ext loading fix

Should resolve native extension loading issues for C and Java extensions.