added support for cmake-generated export define
replaced sleep()-hack by zclock_sleep()-hack