Carjacking thwarted after victim shoots would-be thief