fix for #1040

Here I have a fix for #1040.

On my Windows 7 system now I can build selendroid without stack overflow error.