Merge pull request #2 from jerryrt/master

minor improvements
tweak pull-refresh detection macro.
tweak for Mac porting.