Towards Automatic Identification of Globally Valid Geometric Flat Outputs via Numerical Optimization