Fix declaration shadows a local variable warning.

On iOS 4.x and up, there is a local declaration of the `sourceImg` variable, which causes a warning in Xcode 4.6. This moves the declaration of the `sourceImg` variable outside the `#ifdef` and then doesn't redefine it in the inner block.