Correlation of short waveforms and Cygwin build

These changes allow better correlation of short waveforms - where there are fewer samples than the block size (e.g. 0.75 sec waveform, with a block size of 1 sec). The blocks at the 'end' of the sample are padded with silence so that the correlation is correctly performed on the data, rather than the loop terminating with minimumVal equal to 2.

Also, added a couple of inclusions needed to build under Cygwin.