Malaysian militants bought bomb material for planned attack