With Mavericks, you can solve this problem by installing the Xcode Command Line Tools from the command line like this:
xcode-select --install
Update:
Don’t forget to accept the license agreement after you install or update:
sudo xcodebuild -license