improvements on compiling application in 10.7