changes to fix compile errors in OSX 10.7.5
merge heads