Added a little more compatibility code for non-standard systems.