Adds support for Q promises. Fixes #24.