win32: Replace LOCK_* constants with macros

Change LOCK_* from constants to preprocessor macros, because that's what
the code exporting them to javascript expects.