win32: Replace LOCK_* constants with macros

Change LOCK_* from constants to preprocessor macros, because that's what
the code exporting them to javascript expects.

This is a partial fix for #30. 

/to @baudehlo
/cc @winnetou1357