Fix typo causing build failure when building for a mingw32 target
Add prototype for SetLastError (fixes build, as it is used elsewhere)
Function never fails, return 0 (fixes w32 build)
void gthread_mutex_destroy -> int gthread_mutex_destroy
Merge pull request #72 from Ace17/master

Various build fixes for mingw32 target.