fix build on Linux, fix: always catch const references of exceptions

* With gcc on Linux the options -fexceptions is required.
* Always catch exceptions as const references