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

Use slightly better method of accessing TLS variables.
Revert part of commit ae5eb820358e6ea9b78c9bc08f5c4c92bd6d152b