Fixed INVALID_HANDLE_VALUE for 64-bit Ruby.