[windows] Fix build failures with recent build chain

Add a temporary workaround for ptlib triggered by a new mingw-w64, and
a workaround for theora triggered by a new binutils-mingw-w64.