Burglar killed while attempting to rob home