Add support for Mac
Add promise lib