add support for MSVC

switch for __attribute__((weak))