Fix compilation on Windows.

C89 which Microsofts compiler only support does not allow variable
declarations anywhere but at the start of a scope.

Also, only try to copy the test-server files if they actually exists. For
instance the OpenSSL cert generation fails if you run cmake under the git
bash shell on Windows (won't work with the unix method either) so that
file will be missing... This would result in a compilation error when
tests where turned on.

This also fixes #59