Add a test for #5373 (-rtsopts, dynamic libs and OSX / Windows)