Fix #3056 by forcing python to use Release mode