windows fixes

Almost trivial, but we can compile it now with PHP build system. Also teh params function works now. Not very nice that the crypto lib had to be patched that way, but you can always create a patch with the orig when you have to upgrade. One test fails though, I'll file a ticket about it.