Two militants killed in encounter