Fixed calling convention for non-Windows platforms
Added rewrite postbuild event