Fixed bad libdl link on mingw

Added new --running-in-ci option which shortens or skips various unit tests for the CI.