An Immersed Boundary Method for flows around rectangular objects