There is an official Fide rule to prevent this kind of behavior ("flagging"). This rule however only holds in quickplay finishes of normal tournament games. In blitz managing the time better than your opponent is an integral part of the game. In online games (which mostly are blitz anyway) I have never seen this rule implemented (it's kind of tough without an arbiter).
Also note that this rule only allows you to claim a draw, to win you'll have to checkmate with the time still left to you.
Article 10: Quickplay Finish
A ‘quickplay finish’ is the phase of a game when all the (remaining) moves must be made in a limited time.
If the player, having the move, has less than two minutes left on his clock, he may claim a draw before his flag falls. He shall summon the arbiter and may stop the clocks. (See Article 6.12.b)
If the arbiter agrees the opponent is making no effort to win the game by normal means, or that it is not possible to win by normal means, then he shall declare the game drawn. Otherwise he shall postpone his decision or reject the claim.
(bold by me)