Cmake build fixes

The following patch series fix the following two problems:

1) nmake install did not install the generated configuration file and the visibility header. In addition to that the .dll files should be put in the same directory as the binary to allow the binary to find it without setting the path variable.

2) Building one of the test programs with my MSVC 2013 failed to compile due to a "name conflict" between the function sin and a variable named the same.