HTML - canvas: draw square and rectangle