Fix interprocess_exception throw in file_wrapper::priv_open_or_create.

On Windows the exception object is created using the result of GetLastError().
When compiled using MinGW the throw instruction itself is using some WinApi call which overwrites the last error.
Therefore the error code must be retrieved before the exception is thrown.
Rephrase the #ifdef in errors.hpp