better mingw support; $tls() macro