Merge pull request #3849 from dumganhar/master

[master] Fixing a compilation error for Mac port after merging WIN8 RT &WIN PHONE8 codes.
[master] Removing unused variable, otherwise, it will trigger compilation error on linux.