Use libepoxy as a static lib instead of dll on windows.

Use slightly better method of accessing TLS variables.