Build fixes, separate libevents for debug/release.