Make parser indent API robust; fix js indent detection