Fixed build issues on unices