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