Improve testgles2 exit behavior (useful on Android)