fixed some compatibility issues (including stdlib in various files)