Fix for #619. Adds conditional compliation / conditional runtime logic f...

...or mono.