made RedFly lib more portable