added support for use without freertos.