Measurements of optical losses in mid-infrared semiconductor lasers using Fabry-Perot transmission oscillations