Fixed the implementation of the getScreenshot method

Refs https://github.com/Behat/Mink/pull/470