Fix for cmake not compiling properly on first attempt.