fix #237, LastErrorException/getLastError thread-safe errno on AIX