Pseudocode to fix issue #1299

I am not sure how to detect that pip is run as `pip.exe`, and it may happen that solution won't work.