New function: FindMaximumBinEx (taken from cnipol)