Visual Studio missing this function
Fixing a potential size issue
Add missing macro for dynamic linking