Singapore teen 'planned to attack mosques'