Avoid conflicting _expand functions in PIL & MINGW

fixes #538