Fix std.exception.ifThrown tests in release mode.

As the unit test is not @safe, bounds checking is disabled
when building with -release.
Merge pull request #1352 from klickverbot/fix-exception-test

Fix std.exception.ifThrown tests in release mode.